package com.server;

import com.entry.Product;
import com.entry.Shopping;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface ShoppingService {

    //查询商品并购买支付
    public List<Shopping> getShoppingListPay(int member_id);

    //查询单个商品并且支付
    public List<Shopping> getShoppingListPayList(int member_id,int product_id);

    //更新商品是否被勾选
    int updateCartChecked(int product_id,int member_id,int shopping_checked);

    //查询客户商品的数量
    public int getCount(@Param("member_id")int member_id);

    public List<Shopping> getShoppingList(int member_id);

    //添加商品
    public int addCart(int member_id,int product_id,int shopping_product_amount);

    //添加商品checked=3
    public int addCartChecked(int member_id,int product_id,int shopping_product_amount,int shopping_checked);

    //更新添加商品的数量
    public int updateCartCount(int member_id,int product_id,int shopping_product_amount);

    //查询购物车是否有相同的商品
    public Shopping getCountById(int member_id,int product_id);

    //根据member_id，product_id删除购物车的商品Checked=1
    public int delCartProduct(int member_id,int product_id);

    //根据member_id，product_id删除购物车的商品Checked=1
    public int delCartProducts(int member_id);

    //根据member_id，product_id删除购物车的商品Checked=3
    public int delCartProductByChecked(int member_id,int product_id);

    //根据member_id，shopping_checked删除购物车的商品
    public int delCartProductByCheckeds(int member_id,int shopping_checked);

    //根据member_id清空购物车
    public int delCartProductById(int member_id);
}
